home *** CD-ROM | disk | FTP | other *** search
/ Digitalfoto 118 / Digitalfoto 118.iso / mac / programas / 00 / splash.swf / scripts / __Packages / zigo / tweenManager.as
Text File  |  2008-10-31  |  23KB  |  771 lines

  1. class zigo.tweenManager
  2. {
  3.    var _th_depth = 6789;
  4.    function tweenManager()
  5.    {
  6.       this.playing = false;
  7.       this.autoStop = false;
  8.       this.broadcastEvents = false;
  9.       this.autoOverwrite = true;
  10.       this.ints = new Array();
  11.       this.lockedTweens = new Object();
  12.       this.tweenList = new Array();
  13.    }
  14.    function cleanUp()
  15.    {
  16.       if(!(this.tweenList instanceof Array && this.tweenList.length > 0))
  17.       {
  18.          return undefined;
  19.       }
  20.       for(var _loc2_ in this.tweenList)
  21.       {
  22.          if(this.tweenList[_loc2_].mc._x == undefined)
  23.          {
  24.             this.tweenList.splice(Number(_loc2_),1);
  25.          }
  26.       }
  27.       if(this.tweenList.length == 0)
  28.       {
  29.          this.tweenList = [];
  30.          this.deinit();
  31.       }
  32.       for(_loc2_ in this.ints)
  33.       {
  34.          if(this.ints[_loc2_] != undefined && this.ints[_loc2_].mc._x == undefined)
  35.          {
  36.             this.removeDelayedTween(Number(_loc2_));
  37.          }
  38.       }
  39.    }
  40.    function set updateInterval(time)
  41.    {
  42.       if(this.playing)
  43.       {
  44.          this.deinit();
  45.          this.updateTime = time;
  46.          this.init();
  47.       }
  48.       else
  49.       {
  50.          this.updateTime = time;
  51.       }
  52.    }
  53.    function get updateInterval()
  54.    {
  55.       return this.updateTime;
  56.    }
  57.    function set controllerDepth(v)
  58.    {
  59.       if(_global.isNaN(v) == true)
  60.       {
  61.          return undefined;
  62.       }
  63.       if(this.tweenHolder._name != undefined)
  64.       {
  65.          this.tweenHolder.swapDepths(v);
  66.       }
  67.       else
  68.       {
  69.          this._th_depth = v;
  70.       }
  71.    }
  72.    function get controllerDepth()
  73.    {
  74.       return this._th_depth;
  75.    }
  76.    function init()
  77.    {
  78.       if(this.updateTime > 0)
  79.       {
  80.          clearInterval(this.updateIntId);
  81.          this.updateIntId = setInterval(this,"update",this.updateTime);
  82.       }
  83.       else
  84.       {
  85.          if(this.tweenHolder._name == undefined)
  86.          {
  87.             this.tweenHolder = _root.createEmptyMovieClip("_th_",this._th_depth);
  88.          }
  89.          var tm = this;
  90.          this.tweenHolder.onEnterFrame = function()
  91.          {
  92.             tm.update.call(tm);
  93.          };
  94.       }
  95.       this.playing = true;
  96.       this.now = getTimer();
  97.    }
  98.    function deinit()
  99.    {
  100.       this.playing = false;
  101.       clearInterval(this.updateIntId);
  102.       delete this.tweenHolder.onEnterFrame;
  103.    }
  104.    function update()
  105.    {
  106.       var _loc3_ = undefined;
  107.       var _loc11_ = undefined;
  108.       var _loc4_ = undefined;
  109.       var _loc14_ = false;
  110.       _loc11_ = this.tweenList.length;
  111.       if(this.broadcastEvents)
  112.       {
  113.          var _loc5_ = undefined;
  114.          var _loc8_ = undefined;
  115.          var _loc6_ = undefined;
  116.          var _loc10_ = undefined;
  117.          _loc5_ = {};
  118.          _loc8_ = {};
  119.          _loc6_ = {};
  120.          _loc10_ = {};
  121.       }
  122.       while(true)
  123.       {
  124.          _loc11_;
  125.          if(!_loc11_--)
  126.          {
  127.             break;
  128.          }
  129.          _loc3_ = this.tweenList[_loc11_];
  130.          if(_loc3_.mc._x == undefined)
  131.          {
  132.             _loc14_ = true;
  133.          }
  134.          else if(_loc3_.pt == -1)
  135.          {
  136.             if(_loc3_.ts + _loc3_.d > this.now)
  137.             {
  138.                if(_loc3_.ctm == undefined)
  139.                {
  140.                   if(_global.allowRounding)
  141.                   {
  142.                      _loc3_.mc[_loc3_.pp] = Math.round(_loc3_.ef(this.now - _loc3_.ts,_loc3_.ps,_loc3_.ch,_loc3_.d,_loc3_.e1,_loc3_.e2));
  143.                   }
  144.                   else
  145.                   {
  146.                      _loc3_.mc[_loc3_.pp] = _loc3_.ef(this.now - _loc3_.ts,_loc3_.ps,_loc3_.ch,_loc3_.d,_loc3_.e1,_loc3_.e2);
  147.                   }
  148.                }
  149.                else
  150.                {
  151.                   var _loc9_ = {};
  152.                   for(_loc4_ in _loc3_.ctm)
  153.                   {
  154.                      _loc9_[_loc4_] = _loc3_.ef(this.now - _loc3_.ts,_loc3_.stm[_loc4_],_loc3_.ctm[_loc4_],_loc3_.d,_loc3_.e1,_loc3_.e2);
  155.                   }
  156.                   _loc3_.c.setTransform(_loc9_);
  157.                }
  158.                if(this.broadcastEvents)
  159.                {
  160.                   if(_loc5_[targetPath(_loc3_.mc)] == undefined)
  161.                   {
  162.                      _loc5_[targetPath(_loc3_.mc)] = _loc3_.mc;
  163.                   }
  164.                   if(_loc6_[targetPath(_loc3_.mc)] == undefined)
  165.                   {
  166.                      _loc6_[targetPath(_loc3_.mc)] = [];
  167.                   }
  168.                   _loc6_[targetPath(_loc3_.mc)].push(_loc3_.ctm == undefined ? _loc3_.pp : "_ct_");
  169.                }
  170.                if(_loc3_.cb.updfunc != undefined)
  171.                {
  172.                   var _loc7_ = _loc3_.cb.updfunc;
  173.                   if(typeof _loc7_ == "string" && _loc3_.cb.updscope != undefined)
  174.                   {
  175.                      _loc7_ = _loc3_.cb.updscope[_loc7_];
  176.                   }
  177.                   _loc7_.apply(_loc3_.cb.updscope,_loc3_.cb.updargs);
  178.                }
  179.             }
  180.             else
  181.             {
  182.                if(_loc3_.ctm == undefined)
  183.                {
  184.                   _loc3_.mc[_loc3_.pp] = _loc3_.ps + _loc3_.ch;
  185.                }
  186.                else
  187.                {
  188.                   _loc9_ = {};
  189.                   for(_loc4_ in _loc3_.ctm)
  190.                   {
  191.                      _loc9_[_loc4_] = _loc3_.stm[_loc4_] + _loc3_.ctm[_loc4_];
  192.                   }
  193.                   _loc3_.c.setTransform(_loc9_);
  194.                }
  195.                if(this.broadcastEvents)
  196.                {
  197.                   if(_loc5_[targetPath(_loc3_.mc)] == undefined)
  198.                   {
  199.                      _loc5_[targetPath(_loc3_.mc)] = _loc3_.mc;
  200.                   }
  201.                   if(_loc8_[targetPath(_loc3_.mc)] == undefined)
  202.                   {
  203.                      _loc8_[targetPath(_loc3_.mc)] = _loc3_.mc;
  204.                   }
  205.                   if(_loc6_[targetPath(_loc3_.mc)] == undefined)
  206.                   {
  207.                      _loc6_[targetPath(_loc3_.mc)] = [];
  208.                   }
  209.                   _loc6_[targetPath(_loc3_.mc)].push(_loc3_.ctm == undefined ? _loc3_.pp : "_ct_");
  210.                   if(_loc10_[targetPath(_loc3_.mc)] == undefined)
  211.                   {
  212.                      _loc10_[targetPath(_loc3_.mc)] = [];
  213.                   }
  214.                   _loc10_[targetPath(_loc3_.mc)].push(_loc3_.ctm == undefined ? _loc3_.pp : "_ct_");
  215.                }
  216.                if(_loc3_.cb.updfunc != undefined)
  217.                {
  218.                   _loc7_ = _loc3_.cb.updfunc;
  219.                   if(typeof _loc7_ == "string" && _loc3_.cb.updscope != undefined)
  220.                   {
  221.                      _loc7_ = _loc3_.cb.updscope[_loc7_];
  222.                   }
  223.                   _loc7_.updfunc.apply(_loc3_.cb.updscope,_loc3_.cb.updargs);
  224.                }
  225.                if(endt == undefined)
  226.                {
  227.                   var endt = new Array();
  228.                }
  229.                endt.push(_loc11_);
  230.             }
  231.          }
  232.       }
  233.       if(_loc14_)
  234.       {
  235.          this.cleanUp();
  236.       }
  237.       for(_loc4_ in _loc5_)
  238.       {
  239.          _loc5_[_loc4_].broadcastMessage("onTweenUpdate",{target:_loc5_[_loc4_],props:_loc6_[_loc4_]});
  240.       }
  241.       if(endt != undefined)
  242.       {
  243.          this.endTweens(endt);
  244.       }
  245.       for(_loc4_ in _loc8_)
  246.       {
  247.          _loc8_[_loc4_].broadcastMessage("onTweenEnd",{target:_loc8_[_loc4_],props:_loc10_[_loc4_]});
  248.       }
  249.       this.now = getTimer();
  250.       if(this.updateTime > 0)
  251.       {
  252.          updateAfterEvent();
  253.       }
  254.    }
  255.    function endTweens(tid_arr)
  256.    {
  257.       var _loc2_ = undefined;
  258.       var _loc9_ = undefined;
  259.       var _loc3_ = undefined;
  260.       var _loc5_ = undefined;
  261.       var _loc8_ = undefined;
  262.       _loc2_ = [];
  263.       _loc9_ = tid_arr.length;
  264.       _loc3_ = 0;
  265.       while(_loc3_ < _loc9_)
  266.       {
  267.          _loc5_ = this.tweenList[tid_arr[_loc3_]].cb;
  268.          if(_loc5_ != undefined)
  269.          {
  270.             var _loc6_ = true;
  271.             for(_loc8_ in _loc2_)
  272.             {
  273.                if(_loc2_[_loc8_] == _loc5_)
  274.                {
  275.                   _loc6_ = false;
  276.                   break;
  277.                }
  278.             }
  279.             if(_loc6_)
  280.             {
  281.                _loc2_.push(_loc5_);
  282.             }
  283.          }
  284.          this.tweenList.splice(tid_arr[_loc3_],1);
  285.          _loc3_ = _loc3_ + 1;
  286.       }
  287.       _loc3_ = 0;
  288.       while(_loc3_ < _loc2_.length)
  289.       {
  290.          var _loc4_ = _loc2_[_loc3_].func;
  291.          if(typeof _loc4_ == "string" && _loc2_[_loc3_].scope != undefined)
  292.          {
  293.             _loc4_ = _loc2_[_loc3_].scope[_loc4_];
  294.          }
  295.          _loc4_.apply(_loc2_[_loc3_].scope,_loc2_[_loc3_].args);
  296.          _loc3_ = _loc3_ + 1;
  297.       }
  298.       if(this.tweenList.length == 0)
  299.       {
  300.          this.deinit();
  301.       }
  302.    }
  303.    function removeDelayedTween(index)
  304.    {
  305.       clearInterval(this.ints[index].intid);
  306.       this.ints[index] = undefined;
  307.       var _loc2_ = true;
  308.       for(var _loc3_ in this.ints)
  309.       {
  310.          if(this.ints[_loc3_] != undefined)
  311.          {
  312.             _loc2_ = false;
  313.             break;
  314.          }
  315.       }
  316.       if(_loc2_)
  317.       {
  318.          this.ints = [];
  319.       }
  320.    }
  321.    function addTween(mc, props, pEnd, sec, eqFunc, callback, extra1, extra2)
  322.    {
  323.       var _loc4_ = undefined;
  324.       var _loc13_ = undefined;
  325.       var _loc6_ = undefined;
  326.       var _loc3_ = undefined;
  327.       var _loc2_ = undefined;
  328.       if(!this.playing)
  329.       {
  330.          this.init();
  331.       }
  332.       var _loc12_ = [];
  333.       for(_loc4_ in props)
  334.       {
  335.          _loc13_ = props[_loc4_];
  336.          _loc6_ = true;
  337.          if(_loc13_.substr(0,4) != "_ct_")
  338.          {
  339.             var _loc17_ = typeof pEnd[_loc4_] != "string" ? pEnd[_loc4_] - mc[_loc13_] : Number(pEnd[_loc4_]);
  340.             if(this.autoOverwrite)
  341.             {
  342.                for(_loc3_ in this.tweenList)
  343.                {
  344.                   _loc2_ = this.tweenList[_loc3_];
  345.                   if(_loc2_.mc == mc && _loc2_.pp == _loc13_)
  346.                   {
  347.                      _loc2_.ps = mc[_loc13_];
  348.                      _loc2_.ch = _loc17_;
  349.                      _loc2_.ts = this.now;
  350.                      _loc2_.d = sec * 1000;
  351.                      _loc2_.ef = eqFunc;
  352.                      _loc2_.cb = callback;
  353.                      _loc2_.e1 = extra1;
  354.                      _loc2_.e2 = extra2;
  355.                      _loc2_.pt = -1;
  356.                      _loc6_ = false;
  357.                      _loc12_.push(_loc2_.pp);
  358.                      break;
  359.                   }
  360.                }
  361.             }
  362.             if(_loc6_)
  363.             {
  364.                this.tweenList.unshift({mc:mc,pp:_loc13_,ps:mc[_loc13_],ch:_loc17_,ts:this.now,d:sec * 1000,ef:eqFunc,cb:callback,e1:extra1,e2:extra2,pt:-1});
  365.             }
  366.          }
  367.          else
  368.          {
  369.             var _loc16_ = new Color(mc);
  370.             var _loc20_ = _loc16_.getTransform();
  371.             var _loc19_ = {};
  372.             for(_loc3_ in pEnd[_loc4_])
  373.             {
  374.                if(pEnd[_loc4_][_loc3_] != _loc20_[_loc3_] && pEnd[_loc4_][_loc3_] != undefined)
  375.                {
  376.                   _loc19_[_loc3_] = typeof pEnd[_loc4_][_loc3_] != "string" ? pEnd[_loc4_][_loc3_] - _loc20_[_loc3_] : _loc20_[_loc3_] + Number(pEnd[_loc4_][_loc3_]);
  377.                }
  378.             }
  379.             if(this.autoOverwrite)
  380.             {
  381.                for(_loc3_ in this.tweenList)
  382.                {
  383.                   _loc2_ = this.tweenList[_loc3_];
  384.                   if(_loc2_.mc == mc && _loc2_.ctm != undefined)
  385.                   {
  386.                      _loc2_.c = _loc16_;
  387.                      _loc2_.stm = _loc20_;
  388.                      _loc2_.ctm = _loc19_;
  389.                      _loc2_.ts = this.now;
  390.                      _loc2_.d = sec * 1000;
  391.                      _loc2_.ef = eqFunc;
  392.                      _loc2_.cb = callback;
  393.                      _loc2_.e1 = extra1;
  394.                      _loc2_.e2 = extra2;
  395.                      _loc2_.pt = -1;
  396.                      _loc6_ = false;
  397.                      _loc12_.push("_ct_");
  398.                      break;
  399.                   }
  400.                }
  401.             }
  402.             if(_loc6_)
  403.             {
  404.                this.tweenList.unshift({mc:mc,c:_loc16_,stm:_loc20_,ctm:_loc19_,ts:this.now,d:sec * 1000,ef:eqFunc,cb:callback,e1:extra1,e2:extra2,pt:-1});
  405.             }
  406.          }
  407.       }
  408.       if(this.broadcastEvents)
  409.       {
  410.          if(_loc12_.length > 0)
  411.          {
  412.             mc.broadcastMessage("onTweenInterrupt",{target:mc,props:_loc12_});
  413.          }
  414.          mc.broadcastMessage("onTweenStart",{target:mc,props:props});
  415.       }
  416.       if(callback.startfunc != undefined)
  417.       {
  418.          var _loc27_ = callback.startfunc;
  419.          if(typeof _loc27_ == "string" && callback.startscope != undefined)
  420.          {
  421.             _loc27_ = callback.startscope[_loc27_];
  422.          }
  423.          _loc27_.apply(callback.startscope,callback.startargs);
  424.       }
  425.       if(sec == 0)
  426.       {
  427.          this.update();
  428.       }
  429.    }
  430.    function addTweenWithDelay(delay, mc, props, pEnd, sec, eqFunc, callback, extra1, extra2)
  431.    {
  432.       var il;
  433.       var _loc3_ = undefined;
  434.       il = this.ints.length;
  435.       _loc3_ = setInterval(function(obj)
  436.       {
  437.          obj.removeDelayedTween(il);
  438.          if(mc._x != undefined)
  439.          {
  440.             obj.addTween(mc,props,pEnd,sec,eqFunc,callback,extra1,extra2);
  441.          }
  442.       }
  443.       ,delay * 1000,this);
  444.       this.ints[il] = {mc:mc,props:props,pend:pEnd,intid:_loc3_,st:getTimer(),delay:delay * 1000,args:arguments.slice(1),pt:-1};
  445.       if(!this.playing)
  446.       {
  447.          this.init();
  448.       }
  449.    }
  450.    function removeTween(mc, props)
  451.    {
  452.       var _loc8_ = undefined;
  453.       var _loc2_ = undefined;
  454.       var _loc5_ = undefined;
  455.       _loc8_ = false;
  456.       if(props == undefined && this.broadcastEvents != true)
  457.       {
  458.          _loc8_ = true;
  459.       }
  460.       _loc2_ = this.tweenList.length;
  461.       var _loc4_ = {};
  462.       while(true)
  463.       {
  464.          _loc2_;
  465.          if(!_loc2_--)
  466.          {
  467.             break;
  468.          }
  469.          if(this.tweenList[_loc2_].mc == mc)
  470.          {
  471.             if(_loc8_)
  472.             {
  473.                this.tweenList.splice(_loc2_,1);
  474.             }
  475.             else
  476.             {
  477.                for(_loc5_ in props)
  478.                {
  479.                   if(this.tweenList[_loc2_].pp == props[_loc5_])
  480.                   {
  481.                      this.tweenList.splice(_loc2_,1);
  482.                      if(_loc4_[targetPath(mc)] == undefined)
  483.                      {
  484.                         _loc4_[targetPath(mc)] = {t:mc,p:[]};
  485.                      }
  486.                      _loc4_[targetPath(mc)].p.push(props[_loc5_]);
  487.                   }
  488.                   else if(props[_loc5_] == "_ct_" && this.tweenList[_loc2_].ctm != undefined && this.tweenList[_loc2_].mc == mc)
  489.                   {
  490.                      this.tweenList.splice(_loc2_,1);
  491.                      if(_loc4_[targetPath(mc)] == undefined)
  492.                      {
  493.                         _loc4_[targetPath(mc)] = {t:mc,p:[]};
  494.                      }
  495.                      _loc4_[targetPath(mc)].p.push("_ct_");
  496.                   }
  497.                }
  498.             }
  499.          }
  500.       }
  501.       _loc2_ = this.ints.length;
  502.       while(true)
  503.       {
  504.          _loc2_;
  505.          if(!_loc2_--)
  506.          {
  507.             break;
  508.          }
  509.          if(this.ints[_loc2_].mc == mc)
  510.          {
  511.             if(_loc8_)
  512.             {
  513.                this.removeDelayedTween(Number(_loc2_));
  514.             }
  515.             else
  516.             {
  517.                for(_loc5_ in props)
  518.                {
  519.                   for(var _loc11_ in this.ints[_loc2_].props)
  520.                   {
  521.                      if(this.ints[_loc2_].props[_loc11_] == props[_loc5_])
  522.                      {
  523.                         this.ints[_loc2_].props.splice(_loc11_,1);
  524.                         this.ints[_loc2_].pend.splice(_loc11_,1);
  525.                         if(_loc4_[targetPath(mc)] == undefined)
  526.                         {
  527.                            _loc4_[targetPath(mc)] = {t:mc,p:[]};
  528.                         }
  529.                         _loc4_[targetPath(mc)].p.push(props[_loc5_]);
  530.                      }
  531.                   }
  532.                   if(this.ints[_loc2_].props.length == 0)
  533.                   {
  534.                      clearInterval(this.ints[_loc2_].intid);
  535.                   }
  536.                }
  537.             }
  538.          }
  539.       }
  540.       if(this.broadcastEvents)
  541.       {
  542.          for(_loc11_ in _loc4_)
  543.          {
  544.             if(_loc4_[_loc11_].p.length > 0)
  545.             {
  546.                _loc4_[_loc11_].t.broadcastMessage("onTweenInterrupt",{target:_loc4_[_loc11_].t,props:_loc4_[_loc11_].p});
  547.             }
  548.          }
  549.       }
  550.       if(this.tweenList.length == 0)
  551.       {
  552.          this.deinit();
  553.       }
  554.    }
  555.    function isTweening(mc, prop)
  556.    {
  557.       var _loc4_ = prop == undefined;
  558.       for(var _loc6_ in this.tweenList)
  559.       {
  560.          var _loc2_ = this.tweenList[_loc6_];
  561.          if(this.tweenList[_loc6_].mc == mc && this.tweenList[_loc6_].pt == -1 && (_loc4_ || prop == _loc2_.pp || prop == "_ct_" && _loc2_.ctm != undefined))
  562.          {
  563.             return true;
  564.          }
  565.       }
  566.       return false;
  567.    }
  568.    function getTweens(mc)
  569.    {
  570.       var _loc2_ = 0;
  571.       for(var _loc4_ in this.tweenList)
  572.       {
  573.          if(this.tweenList[_loc4_].mc == mc)
  574.          {
  575.             _loc2_ = _loc2_ + 1;
  576.          }
  577.       }
  578.       return _loc2_;
  579.    }
  580.    function lockTween(mc, bool)
  581.    {
  582.       this.lockedTweens[targetPath(mc)] = bool;
  583.    }
  584.    function isTweenLocked(mc)
  585.    {
  586.       if(this.lockedTweens[targetPath(mc)] == undefined)
  587.       {
  588.          return false;
  589.       }
  590.       return this.lockedTweens[targetPath(mc)];
  591.    }
  592.    function ffTween(mc, propsObj)
  593.    {
  594.       var _loc4_ = mc == undefined;
  595.       var _loc6_ = propsObj == undefined;
  596.       for(var _loc8_ in this.tweenList)
  597.       {
  598.          var _loc2_ = this.tweenList[_loc8_];
  599.          if((_loc2_.mc == mc || _loc4_) && (_loc6_ || propsObj[_loc2_.pp] == true))
  600.          {
  601.             if(_loc2_.pt != -1)
  602.             {
  603.                _loc2_.pt = -1;
  604.             }
  605.             _loc2_.ts = this.now - _loc2_.d;
  606.          }
  607.       }
  608.       for(_loc8_ in this.ints)
  609.       {
  610.          if(this.ints[_loc8_] != undefined)
  611.          {
  612.             if(this.ints[_loc8_].mc == mc || _loc4_)
  613.             {
  614.                if(this.ints[_loc8_].mc._x != undefined)
  615.                {
  616.                   var _loc3_ = this.ints[_loc8_].args;
  617.                   _loc3_[3] = 0;
  618.                   this.addTween.apply(this,_loc3_);
  619.                }
  620.                this.removeDelayedTween(Number(_loc8_));
  621.             }
  622.          }
  623.       }
  624.       this.update();
  625.    }
  626.    function rewTween(mc, propsObj)
  627.    {
  628.       var _loc3_ = mc == undefined;
  629.       var _loc5_ = propsObj == undefined;
  630.       for(var _loc7_ in this.tweenList)
  631.       {
  632.          var _loc2_ = this.tweenList[_loc7_];
  633.          if((_loc2_.mc == mc || _loc3_) && (_loc5_ || propsObj[_loc2_.pp] == true))
  634.          {
  635.             if(_loc2_.pt != -1)
  636.             {
  637.                _loc2_.pt = -1;
  638.             }
  639.             _loc2_.ts = this.now;
  640.          }
  641.       }
  642.       for(_loc7_ in this.ints)
  643.       {
  644.          if(this.ints[_loc7_] != undefined)
  645.          {
  646.             if(this.ints[_loc7_].mc == mc || _loc3_)
  647.             {
  648.                if(this.ints[_loc7_].mc._x != undefined)
  649.                {
  650.                   this.addTween.apply(this,this.ints[_loc7_].args);
  651.                }
  652.                this.removeDelayedTween(Number(_loc7_));
  653.             }
  654.          }
  655.       }
  656.       this.update();
  657.    }
  658.    function isTweenPaused(mc, prop)
  659.    {
  660.       if(mc == undefined)
  661.       {
  662.          return null;
  663.       }
  664.       var _loc5_ = prop == undefined;
  665.       for(var _loc6_ in this.tweenList)
  666.       {
  667.          var _loc2_ = this.tweenList[_loc6_];
  668.          if(this.tweenList[_loc6_].mc == mc && (_loc5_ || prop == _loc2_.pp || prop == "_ct_" && _loc2_.ctm != undefined))
  669.          {
  670.             return Boolean(this.tweenList[_loc6_].pt != -1);
  671.          }
  672.       }
  673.       for(_loc6_ in this.ints)
  674.       {
  675.          if(this.ints[_loc6_] != undefined && this.ints[_loc6_].mc == mc)
  676.          {
  677.             return Boolean(this.ints[_loc6_].pt != -1);
  678.          }
  679.       }
  680.       return false;
  681.    }
  682.    function pauseTween(mc, propsObj)
  683.    {
  684.       var _loc3_ = mc == undefined;
  685.       if(_loc3_ == false && this.isTweenPaused(mc) == true)
  686.       {
  687.          return undefined;
  688.       }
  689.       var _loc6_ = propsObj == undefined;
  690.       for(var _loc7_ in this.tweenList)
  691.       {
  692.          var _loc2_ = this.tweenList[_loc7_];
  693.          if(_loc2_.pt == -1 && (_loc2_.mc == mc || _loc3_) && (_loc6_ || propsObj[_loc2_.pp] == true || propsObj._ct_ != undefined && _loc2_.ctm != undefined))
  694.          {
  695.             _loc2_.pt = this.now;
  696.          }
  697.       }
  698.       for(_loc7_ in this.ints)
  699.       {
  700.          if(this.ints[_loc7_] != undefined)
  701.          {
  702.             if(this.ints[_loc7_].pt == -1 && (this.ints[_loc7_].mc == mc || _loc3_))
  703.             {
  704.                this.ints[_loc7_].pt = this.now;
  705.             }
  706.          }
  707.       }
  708.    }
  709.    function unpauseTween(mc, propsObj)
  710.    {
  711.       var _loc4_ = mc == undefined;
  712.       if(_loc4_ == false && this.isTweenPaused(mc) === false)
  713.       {
  714.          return undefined;
  715.       }
  716.       var _loc7_ = propsObj == undefined;
  717.       if(!this.playing)
  718.       {
  719.          this.init();
  720.       }
  721.       for(var _loc2_ in this.tweenList)
  722.       {
  723.          var _loc3_ = this.tweenList[_loc2_];
  724.          if(_loc3_.pt != -1 && (_loc3_.mc == mc || _loc4_) && (_loc7_ || propsObj[_loc3_.pp] == true) || propsObj._ct_ != undefined && _loc3_.ctm != undefined)
  725.          {
  726.             _loc3_.ts = this.now - (_loc3_.pt - _loc3_.ts);
  727.             _loc3_.pt = -1;
  728.          }
  729.       }
  730.       for(_loc2_ in this.ints)
  731.       {
  732.          if(this.ints[_loc2_] != undefined)
  733.          {
  734.             if(this.ints[_loc2_].pt != -1 && (this.ints[_loc2_].mc == mc || _loc4_))
  735.             {
  736.                this.ints[_loc2_].delay -= this.ints[_loc2_].pt - this.ints[_loc2_].st;
  737.                this.ints[_loc2_].st = this.now;
  738.                this.ints[_loc2_].intid = setInterval(function(obj, id)
  739.                {
  740.                   obj.addTween.apply(obj,obj.ints[id].args);
  741.                   clearInterval(obj.ints[id].intid);
  742.                   obj.ints[id] = undefined;
  743.                }
  744.                ,this.ints[_loc2_].delay,this,_loc2_);
  745.             }
  746.          }
  747.       }
  748.    }
  749.    function pauseAll()
  750.    {
  751.       this.pauseTween();
  752.    }
  753.    function unpauseAll()
  754.    {
  755.       this.unpauseTween();
  756.    }
  757.    function stopAll()
  758.    {
  759.       for(var _loc2_ in this.ints)
  760.       {
  761.          this.removeDelayedTween(Number(_loc2_));
  762.       }
  763.       this.tweenList = new Array();
  764.       this.deinit();
  765.    }
  766.    function toString()
  767.    {
  768.       return "[AS2 tweenManager 1.2.0]";
  769.    }
  770. }
  771.